home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / misc / x10ctrl.lha / x10ctrl.doc < prev    next >
Text File  |  1989-10-14  |  12KB  |  296 lines

  1.  
  2.     AMIGA CONTROL PROGRAM FOR THE X10 USA, INC.,
  3.     
  4.             CP290 COMPUTER INTERFACE
  5.  
  6.  
  7.  
  8.         (C) 1988, Stephen L. Childress
  9.             Phone: 818/706-5247
  10.             Plink: OPS274
  11.             USENET: ..!wlbr!etn-rad!steve
  12.             CI$:   73007,350
  13.             VAUX BBS: Steve
  14.         
  15. RIGHTS AND TITLE STATEMENT
  16.  
  17.     The above listed person is the author and owner of this software. I grant
  18.     permission to duplicate and use this software for not-for-resale, non-
  19.     commercial and not-for-profit uses. Other uses require my permission via
  20.     written contract between author and user.
  21.  
  22.     Source in Lattice C available to beautiful people only.
  23.  
  24.         
  25.         THIS IS A PRELIMINARY VERSION OF THE SOFTWARE.
  26.         IF YOU FIND A BUG,    PLEASE ADVISE.
  27.         
  28.  
  29.  
  30. INTRODUCTION
  31.  
  32. The X10 USA company manufactures a series of low cost devices which enable an
  33. electrical or electrically controlled device to be controlled remotely, within
  34. a home or small building. To do so, the controlled device, such as a lamp, is
  35. plugged into an X10 USA "module" which is in turn plugged into a wall outlet.
  36. A controlling transmitter unit, resembling a hand calculator's keyboard, can be
  37. plugged into an outlet in the same building. The device (lamp) can be turned
  38. on, off, and dimmed using the transmitting controller. Other than the lamp
  39. control module, there are other modules to control higher power devices such as
  40. spas, coffee pots, and the like.
  41.  
  42. There are also transmitting controllers which are embedded in a wall switch
  43. which replaces a standard wall switch.  New X10 products include a module which
  44. contains a contact closure which is activiated remotely at will. This closure
  45. can be wired to, say, a garage door opener's manual switch, enabling one to
  46. close said door remotely. The X10 product line also includes a transmitting
  47. controller which uses a wireless link thus enabling you to control things while
  48. roaming around your estate or from your automobile.
  49.  
  50. The subject at hand is the X10 USA computer control product (CP290), available
  51. from DAK, Sears, Radio Shack, Heathkit, and others, for about $30-40. This unit
  52. functions as a transmitting controller, has integral push buttons, and provides
  53. an RS232 serial link to a computer such as the Amiga. Inside the CP290 is a
  54. small microprocessor and a battery-backed-up memory. The idea is for the Amiga
  55. computer to use the serial link to load a schedule of on/off/dim events into
  56. the CP290's memory. Having done so, the CP290 will forever follow that
  57. schedule, turning things on and off at the prescribed times on prescribed days
  58. of the week.
  59.  
  60. There are commercial CP290 support software packages for MS-DOS, Macintoshi,
  61. Radio Shacks, and others. I wrote this program to learn how to use Intuition
  62. and because I did not like the human factors and ease of use in the demo
  63. version of the Amiga support package.
  64.  
  65. The benefits of using the CP290 include:
  66.  
  67.     o Outdoor lighting on/off via one unit; cheaper than multiple timers
  68.     o Can turn on key lights for brief time each day, e.g., for AM departure
  69.     o Can repeatedly turn off lights which children tend to leave on
  70.     o Close garage door each night
  71.     o Run Spa or pool filter each day
  72.     o Turn on dimmed hallway and/or porch lights each day
  73.     o Can control lights, TV, or radio to simulate occupancy during absences
  74.     
  75.     o See "HINTS", below.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. USE OF AMIGA SOFTWARE
  85.  
  86. The program uses a 650 x 420 hi-res screen with 16 colors. The sofware will
  87. run without a CP290 connected, if you do not choose the send or receive
  88. options. If you wish to abort the program without affecting the CP290 or any
  89. disk files, click on the CLOSE window gadget or the word QUIT in the gadgets in
  90. the bottom of the screen. If asked about saving data to a file, click on NO.
  91.  
  92. You will probably not need a manual to use the program. There are, though, a
  93. few non-obvious things:
  94.  
  95. 1. When run, the program tries to find a data file in the current directory. If
  96. it is not found, it asks for a new pathname. If you wish a blank, event-less
  97. screen, click on the requesting window's close gadget. If you venture into this
  98. program for the first time without pre-existing events, you'll have more
  99. difficulty learning. Put the file X10DATA in the current directory before
  100. running this program for the first time.
  101.  
  102. 2. Choose the first event for a module by clicking on the module number on the
  103. right side of the screen. Click again for the next event. Click on an
  104. *existing* event to activate it. The details about an event are displayed
  105. textually on the bottom right side of the screen. The active event changes from
  106. multi-color to red.
  107.  
  108. 3. Be sure to check or establish the date known to your CP290 by clicking on
  109. SET-DATE. You must change the time to accomodate daylight savings time.
  110.  
  111. 4. Click on SET BASE if your X10 modules do not use house codes A and B.
  112.  
  113. 5. Clicking on a module number has no effect if there are no established events
  114. for that module. 
  115.  
  116. 6. Click on SET NAME to enter a module description, e.g., hall lights.
  117.  
  118. 7. Click on SECURITY to cause the event to vary randomly by one hour.
  119.  
  120. 8. Click on SEND to load the events and module names into the CP290.
  121.  
  122. 9. Click on RECEIVE to recall events and module names from the CP290.
  123.  
  124. 10. Don't choose DIMMER or BRIGHTER for other than X10 Lamp Modules.
  125.  
  126. 11. Click on CMD NOW to cause the CP290 to do the active event now.
  127.  
  128. 12. Click on a day of the week to add/remove it from the active event.
  129.  
  130. 13. Because all events and module names are stored inside the CP290, it is not
  131. essential to keep a copy on disk. You can always use RECEIVE to recall the
  132. data. However, disk files are an easy way to switch between normal and vacation
  133. schedules, or for seasonal (sunset-related) changes.
  134.  
  135. 14. Create new events by drawing a line using the left mouse button.
  136.  
  137. 15. Delete the active event by choosing DELETE.
  138.  
  139. 16. An OFF command is automatically created by the software for every event you
  140. enter. You choose what X10 command is to occur at the beginning of the event.
  141. If you define the start of the event to be an OFF command, a second OFF command
  142. is not added by the software. 
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. DETAILED USE INSTRUCTIONS
  150.  
  151. When run, the screen depicts 32 X10 modules, numbered A1 through A16 and B1
  152. through B16. This corresponds to the way the thumbwheel switches are set on the
  153. X10 modules, so that each module can be given a unique code. (It is legal to
  154. give the same code to multiple modules; indeed, this is often done to
  155. synchronize, say, several lamps in the same room.) On the Amiga's monitor
  156. screen, the 32 modules displayed will have on/off/dim events at particular
  157. times of the day. A bar chart like display, for each of the modules, reveals
  158. the start/stop time for each event for each module. Each bar consists of up to
  159. seven parallel lines, each corresponding to the day of the week for which the
  160. event is allowed. 
  161.  
  162. To scrutinize an module's events, use the mouse to click on a module number or
  163. click on the event itself. This results in a textual status display which lists
  164. the event's start and stop time, the days of the week for which it to occur,
  165. and the X10 command which is to be issued at the start of the event. The X10
  166. command will be either ON, OFF, or DIM. For DIM, a number between 1 and 16 is
  167. shown which indicates the chosen brightness. The chosen event is displayed in
  168. RED. Other events are shown in multi-colors, according to the days of the week
  169. activated. Each day has a unique color.
  170.  
  171. If the mouse is clicked where there is no event data, a new event is created.
  172. Be careful - clicking the mouse without care will create very brief events. To
  173. delete an accidentally added event, click the mouse on the DELETE gadget in the
  174. bottom of the screen, if the undesired event is active (RED). If the undesired
  175. event is not active, make it so by clicking on the module number on the right
  176. side of the screen. To activate each event in turn, for a given module, click
  177. on the module number, then on NEXT, repeatedly. Click on DELETE when the
  178. undesired event is active (RED), as NEXT is repeated.
  179.  
  180. To activate a tiny event (short duration), click repeatedly on the module
  181. number until the event is RED and you see its description in the text summary
  182. on the bottom right of the screen.
  183.  
  184. To draw a new event, draw a line by holding down the left button of the
  185. mouse while dragging it to the right. Fine-tune the start, end, or duration
  186. times using the EARLIER, LATER, LONGER, and SHORTER gadgets.
  187.  
  188. Click on a day of the week to reverse the on/off choice for that day for the
  189. active event.
  190.  
  191. Click on WEEKEND or WEEKDAY to reverse the on/off choice for those days.
  192.  
  193. Click on SECURITY if you want the event's start/stop times to vary randomly by
  194. about an hour (see CP290 manual).
  195.  
  196. Click on SET NAME to establish or revise the description of a module's purpose.
  197. This is what is displayed to the right of the module number on the screen.
  198.  
  199. If your serial port is not connected to a CP290 and you attempt to SEND or
  200. RECEIVE, you will receive an error requestor in about 30 seconds.
  201.  
  202. Click on CMD NOW to actually do the X10 command immediately. Be careful to undo
  203. the command if need be... don't leave the pool filter on all night!
  204.  
  205. Click on NEW FILE to save and/or load new event data to/from disk. If you exit
  206. the program without saving, you will be automatically prompted to do so. The
  207. data stored on disk is a printable ASCII text file. (See Appendix A).
  208.  
  209.  
  210.  
  211.  
  212.  
  213. HINTS
  214.  
  215. o Define no-duration OFF events to turn off things in case you are forgetful.
  216.  
  217. o Use an appliance module to close the garage door. (I have circuit).
  218.  
  219. o Establish fancy schedules for outdoor lights.
  220.  
  221. o Use X10's 20 Amp contactor module for big motors and other loads.
  222.  
  223. o Buy one 12 or 24 VAC transformer for all your outdoor "Malibu" lights. Buy
  224. only the lights - save money by not buying many timers.
  225.  
  226. o Replace wall switches with X10 switches. Let the CP290 turn off lights to
  227. save electricity if your kids have poor habits (or if you are lazy).
  228.  
  229. o Run your spa or pool filter daily cleaning via the CP290.
  230.  
  231. o Let the CP290 turn on the spa before you return home from dinner, to have it
  232. ready!
  233.  
  234. o Program the CP290 to light up dark hallways, sidewalks, etc, for early
  235. morning joggers or departures to work - duration, say, 30 minutes.
  236.  
  237. o Use X10's new dry contact closure module to automate most anything ... lawn
  238. sprinklers, drip irrigation system, etc.
  239.  
  240. o Use an appliance module to turn on the Amiga at an appropriate time. Using a
  241. startup batch file, have the Amiga down-load to the CP290 a new schedule and
  242. the CP290 can then turn off the Amiga. Thus, the CP290 turns on the Amiga which
  243. then reprograms the CP290 to do things including turning off the Amiaga. 
  244.  
  245. Egad! A monster!
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253. -----------
  254.  
  255. APPENDIX A
  256.  
  257. DISK FILE DATA LAYOUT:
  258.  
  259. Line one of the "typical file" shown below, contains 9 events and 9 defined
  260. modules. Reading the first line:
  261.  
  262. EVENT NUMBER = 1, START TIME X-AXIS = 370, END TIME X AXIS = 475, 
  263. DAYS MASK = 127 (0X80), X10 command code = 5 (dim), dimness = 7, security = 0
  264.  
  265. To convert an X-Axis value to a time of day, multiply by 3 to get minutes past
  266. midnight. Refer to the CP290 Programming manual for details of the day mask,
  267. command, dimness, and security bit-layouts.
  268.  
  269.  
  270. Following the nine event data lines, there is an line of all zeros which
  271. delimits the event data. Next, there are nine lines of module names. Each line
  272. contains a module number followed by an ASCII string. Module B1 would appear
  273. here as number 17. 
  274.  
  275.  
  276. -----------------------
  277. TYPICAL FILE:
  278.  
  279. 1,370,475,127,5,7,0
  280. 2,479,479,127,3,7,0
  281. 5,370,476,127,5,7,0
  282. 6,440,440,127,2,0,0
  283. 6,479,479,127,2,0,0
  284. 7,370,479,112,2,0,0
  285. 8,320,330,127,2,0,0
  286. 8,478,478,127,3,0,0
  287. 9,122,127,15,2,0,0
  288. 0,0,0,0,0,0,0
  289. 1,"Hall Light "
  290. 2,"Living Rm. Lamp"
  291. 5,"Driveway Lights"
  292. 6,"Garage Door Clo"
  293. 7,"Decorative Ligh"
  294. 8,"Spa Filter "
  295. 9,"Front Security "
  296.